#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
#define rep(i, a, b) for (int i = (a); i <= (b); i++)
#define per(i, a, b) for (int i = (a); i >= (b); i--)
#define endl '\n'
const int N = 205;

int h, t, R, n, m;
int a1[N], a2[N];
int b1[N], b2[N];

int dis[N][N];
int dp[N][N];
vector<pii> ch[N][N];
int ind[N][N];
void build() {
  rep(i, 0, R) rep(j, 0, R) {
    rep(k, 1, min(n, i)) {
      int x = i - k + a1[k];
      int y = j + a2[k];
      if (x + y > R) x = R + 1, y = 0;
      ch[i][j].push_back(pii(x, y));
    }
    rep(k, 1, min(m, j)) {
      int x = i + b1[k];
      int y = j - k + b2[k];
      if (x + y > R) x = R + 1, y = 0;
      ch[i][j].push_back(pii(x, y));
    }
  }
}
bool bfs(int h, int t) {
  memset(dis, -1, sizeof(dis));
  queue<pii> q;
  dis[h][t] = 0;
  q.push(pii(h, t));
  while (q.size()) {
    pii now = q.front();
    q.pop();
    int x = now.first, y = now.second;
    for (pii nxt : ch[x][y]) {
      int x2 = nxt.first, y2 = nxt.second;
      if (dis[x2][y2] == -1) {
        dis[x2][y2] = dis[x][y] + 1;
        q.push(pii(x2, y2));
      }
    }
  }
  return dis[0][0] != -1;
}
int num;
void get_ind() {
  if (dis[R + 1][0] != -1) num = 1;
  rep(i, 0, R) rep(j, 0, R - i) {
    if (dis[i][j] == -1) continue;  // won't get there
    num++;
    for (pii nxt : ch[i][j]) {
      int x = nxt.first, y = nxt.second;
      if (dis[x][y] == -1) continue;
      ind[x][y]++;
    }
  }
}

bool vis[N][N];
int dfs(int x, int y) {
  if (vis[x][y]) {
    cout << "Draw" << endl;
    exit(0);
  }
  if (dp[x][y] != -1) return dp[x][y];
  vis[x][y] = 1;
  dp[x][y] = -1e9;
  for (pii nxt : ch[x][y]) {
    int x2 = nxt.first, y2 = nxt.second;
    int val = dfs(x2, y2);
    if (val < 0) continue;
    dp[x][y] = max(dp[x][y], dp[x2][y2] + 1);
  }
  vis[x][y] = 0;
  return dp[x][y];
}
void solve() {
  cin >> h >> t >> R;
  cin >> n;
  rep(i, 1, n) cin >> a1[i] >> a2[i];
  cin >> m;
  rep(i, 1, m) cin >> b1[i] >> b2[i];
  build();
  if (bfs(h, t)) {
    cout << "Ivan" << endl;
    cout << dis[0][0] << endl;
    return;
  }
  memset(dp, -1, sizeof(dp));
  dp[R + 1][0] = 0;
  dfs(h, t);
  cout << "Zmey" << endl;
  cout << dp[h][t] << endl;
  return;
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int t = 1;
  while (t--) solve();
  return 0;
}